﻿<UserControl
    x:Class="CodeShow.CS.Shared.ScalingTextDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CodeShow.CS.Shared"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <!--BeginCutPaste-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="150" />
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="300" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="1" Grid.Column="1" Background="Gray">
            <TextBlock Text="Scale Me" 
                       FontSize="12" 
                       HorizontalAlignment="Center" 
                       VerticalAlignment="Center"
                       Margin="-60,0,0,0">
                <TextBlock.RenderTransform>
                    <ScaleTransform 
                        x:Name="TextScaleTransform" 
                        ScaleX="{Binding Value,
                        ElementName=TextScaleSlider}" 
                        ScaleY="{Binding Value,
                        ElementName=TextScaleSlider}"
                        CenterX="15"
                        CenterY="5"/>
                </TextBlock.RenderTransform>
            </TextBlock>
        </Grid>
        <Slider 
            x:Name="TextScaleSlider" 
            Grid.Row="3" 
            Grid.Column="1" 
            Minimum="0" 
            Maximum="5"
            SnapsTo="Ticks"
            TickFrequency="0.01"
            Value="0.5"
            Width="300"
            Height="45"/>
    </Grid>
    <!--EndCutPaste-->
</UserControl>
